package com.yicong.ants.view.video;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.annotation.StringRes;

import com.yicong.ants.R;


/**
 * @author cchao
 * @version 2018/5/26.
 */
public class VideoEmptyViewImpl extends LinearLayout {

    TextView mTvEmpty;

    public VideoEmptyViewImpl(Context context) {
        this(context, null);
    }

    public VideoEmptyViewImpl(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public VideoEmptyViewImpl(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        LayoutInflater.from(context).inflate(R.layout.video_home_empty, this, true);
        mTvEmpty = findViewById(R.id.empty_text);
    }

    public VideoEmptyViewImpl setText(@StringRes int id) {
        mTvEmpty.setText(id);
        return this;
    }
}
